/*
Zhu, Xuan 	
Proposal title: Does Self-affirmation Influence Health Message Processing through Changing Construal Level?


HYPOTHESES

Stated-Hyp1: "We hypothesize that self-affirmed participants will show lower defensive responses toward the health message and higher intention to perform the recommended behavior, compared with unaffirmed participants" [Experiment 1] (p. 3)

	NOTE: There are no clues about exactly which questions measure defensiveness and how they should be coded. Can't test hypotheses about defensiveness.
	
	Test-Hyp1: Intention to perform recommended behavior will be higher among self-affirmed participants vs. non-self affirmed.

Stated-Hyp2: "We hypothesize that self-affirmed participants will show higher construal levels than unaffirmed participants." [Experiment 2] (p. 4)

	Test-Hyp2: Construal level will be higher among self-affirmed participants vs. non-self affirmed.

Stated-Hyp3: "We hypothesize that participants in the high level construal condition will show lower defensive responses toward the message and higher intention to perform the recommended behavior, compared with participants in the low level construal condition." (p. 4)

	NOTE: There are no clues about exactly which questions measure defensiveness and how they should be coded. Can't test hypotheses about defensiveness.
	
	Test-Hyp3: Intention to perform recommended behavior will be higher among participants in the high construal condition vs. low construal.

Stated-Hyp4: "We hypothesize that self-affirmation (Experiment 1) and inducing high
level construal (Experiment 3) will increase the association between attitude and intention
and decrease the association between perceived behavioral control and intention." (p. 4)

	// NOTE: construal and self-affirmation conditions don't overlap so we can't test interaction of both. 
	
	Test-Hyp4: Self-affirmation treatment will moderate (increase) the relationship between attitude and intention.
	Test-Hyp5: Self-affirmation treatment will moderate (decrease) the relationship between percieved control and intention.	
	
	Test-Hyp6: High construal treatment will moderate (increase) the relationship between attitude and intention.
	Test-Hyp7: High construal treatment will moderate (decrease) the relationship between percieved control and intention.		

********************************************************************************
NOTES:
- 3 experiments, 6 experimental conditions	
- Proposal didn't specify which items measure "defensive responses and 
attitude". Cannot test hypotheses about defensiveness.

- Proposal didn't specify how to score the construal questions (for outcome). 
We are using my understanding of high and low construal based on the description 
in the proposal. 

- Proposal didn't specify what the "attitude towards recommended behavior" 
questions are. We are including questions that measure positive or negative 
valence towards recommended behavior.

- Stated hypothesis 4 seems to suggest interaction of construal and 
self-affirmation conditions. But those conditions don't overlap so we can't 
test interaction of both. 
*/

clear all
use "Xuan1195.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* Experiment number

	tab RND_00
	
	/* from quex:
	Condition 1 -------------------------------------------------------------
	Participants will complete 3 tasks: 1) complete the self-affirmation exercise, 2) read a health message, and 3) answer message effects questions.

	Condition 2 -------------------------------------------------------------
	Participants will complete 2 tasks: 1) read a health message and 2) answer message effects questions. 

	Condition 3 -------------------------------------------------------------
	Participants will complete 2 tasks: 1) complete the self-affirmation exercise and 2) answer construal level questions. 

	Condition 4 -------------------------------------------------------------
	Participants will complete 1 task: answer construal level questions. 

	Condition 5 -------------------------------------------------------------
	Participants will complete 3 tasks: 1) complete high level construal exercise, 2) read the health message, and 3) answer message effects questions.

	Condition 6 -------------------------------------------------------------
	Participants will complete 3 tasks: 1) complete low level construal exercise, 2) read the health message, and 3) answer message effects questions.

	*/

	recode RND_00 (1/2=1) (*=.), gen(experiment1)
	recode RND_00 (3/4=1) (*=.), gen(experiment2)
	recode RND_00 (5/6=1) (*=.), gen(experiment3)
	
* affirmation treatment
	recode RND_00 (1=1) (3=1) (2=0) (4=0) (*=.), gen(treat_affirm)
	tab treat_affirm
	
* construal condition	
	recode RND_00 (1/4=.) (5=1) (6=0), gen(treat_hiconstrual)
	tab treat_hiconstrual

	
	
* OUTCOME MEASURES

* defensive responses
	// not sure how the author planned to measure defensiveness.
	

* construal level
	/*
	Q17	[Eating] Choose the sentence that best describes the behavior for you.	
	Q18	[Having a cavity filled] Choose the sentence that best describes the behavior for you.	
	Q19	[Tooth brushing] Choose the sentence that best describes the behavior for you.	
	Q20	[Filling out a personality test] Choose the sentence that best describes the behavior for you.	REVERSE
	Q21	[Growing a garden] Choose the sentence that best describes the behavior for you.	REVERSE
	Q22	[Measuring a room for carpeting] Choose the sentence that best describes the behavior for you.	REVERSE
	Q23	[Making a list] Choose the sentence that best describes the behavior for you.	
	Q24	[Greeting someone] Choose the sentence that best describes the behavior for you. REVERSE	
	Q25	[Taking a test] Choose the sentence that best describes the behavior for you. REVERSE	
	Q26	[Painting a room] Choose the sentence that best describes the behavior for you. REVERSE
	Q27	[Picking an apple] Choose the sentence that best describes the behavior for you.
	Q28	[Caring for houseplants] Choose the sentence that best describes the behavior for you. REVERSE
	
	also 30-41 are the same questions
	*/
	
	replace Q17=Q30 if Q17==.
	replace Q18=Q31 if Q18==.
	replace Q19=Q32 if Q19==.
	replace Q20=Q33 if Q20==.
	replace Q21=Q34 if Q21==.
	replace Q22=Q35 if Q22==.
	replace Q23=Q36 if Q23==.		
	replace Q24=Q37 if Q24==.
	replace Q25=Q38 if Q25==.	
	replace Q26=Q39 if Q26==.	
	replace Q27=Q40 if Q27==.	
	replace Q28=Q41 if Q28==.		
	
	* recode missing
	forval i=17/28 {
		recode Q`i' (1=1) (2=2) (*=.)
		tab Q`i'
		}

	* recode 2=0
	forval i=17/28 {
		recode Q`i' (1=1) (2=0) (*=.)
		tab Q`i', nol
		}	
			
	* recode so that 1 = high construal, 0=low construal (correct reverse coded questions)
	foreach var in Q20 Q21 Q22 Q24 Q25 Q26 Q28 {
		recode `var' (1=0) (0=1) (*=.)
		tab `var', nol
		}		
		
	* create summated scale
	gen hiconstrual = Q17+Q18+Q19+Q20+Q21+Q22+Q23+Q24+Q25+Q26+Q27+Q28
	tab hiconstrual
	
	
* perceived behavioral control 

	/*
	How sure are you that you could drink no more than a moderate level on the days you drink if you really wanted to?
	*/
	foreach var in Q8 Q14 Q57 Q71 {
		tab `var'
		replace `var'=. if `var'>8
		tab `var'
	}
	
	clonevar control = Q8
	replace control =Q14 if control==.
	replace control =Q57 if control==.
	replace control =Q71 if control==.
	tab control	
	
* intention to perform the recommended behavior

	*I intend to drink no more than a moderate level on the days I drink.
	foreach var in Q6 Q12 Q55 Q69 {
		tab `var'
		replace `var'=. if `var'>8
		tab `var'
	}
	
	clonevar intent = Q6
	replace intent =Q12 if intent==.
	replace intent =Q55 if intent==.
	replace intent =Q69 if intent==.
	tab intent

	
* attitude towards the recommended behavior
	/*
	Q56A	For me, drinking no more than a moderate level on the days I drink would be:	
	Q56B	For me, drinking no more than a moderate level on the days I drink would be:	
	Q56C	For me, drinking no more than a moderate level on the days I drink would be:	
	Q56D	For me, drinking no more than a moderate level on the days I drink would be:
	Q56E	For me, drinking no more than a moderate level on the days I drink would be:
	
	also, 70A-E, 13A-E, 7A-E are the same
	*/
	
	replace Q56A =Q70A if Q56A==.
	replace Q56B =Q70B if Q56B==.
	replace Q56C =Q70C if Q56C==.
	replace Q56D =Q70D if Q56D==.
	replace Q56E =Q70E if Q56E==.
	
	replace Q56A =Q13A if Q56A==.
	replace Q56B =Q13B if Q56B==.
	replace Q56C =Q13C if Q56C==.
	replace Q56D =Q13D if Q56D==.
	replace Q56E =Q13E if Q56E==.
	
	replace Q56A =Q7A if Q56A==.
	replace Q56B =Q7B if Q56B==.
	replace Q56C =Q7C if Q56C==.
	replace Q56D =Q7D if Q56D==.
	replace Q56E =Q7E if Q56E==.
	
	foreach var in Q56A Q56B Q56C Q56D Q56E {
		tab `var'
		replace `var'=. if `var'>3
		tab `var'
	}
	
	gen attitude = Q56A +Q56B+Q56C + Q56D + Q56E
	tab attitude
	
********************************************************************************

* ANALYSIS
	

*Test-Hyp1: Intention to perform recommended behavior will be higher among self-affirmed participants vs. non-self affirmed.
	reg intent i.treat_affirm
	// reject. p=0.182
	tess 1.treat_affirm +, init(Xuan1195) bonf(2)
	
*Test-Hyp2: Construal level will be higher among self-affirmed participants vs. non-self affirmed.
	reg hiconstrual i.treat_affirm
	// do not reject. p=0.000
	tess 1.treat_affirm +, bonf(2)
	
*Test-Hyp3: Intention to perform recommended behavior will be higher among participants in the high construal condition vs. low construal.

	reg intent i.treat_hiconstrual
	// reject. p=0.738
	tess 1.treat_hiconstrual +
	

*Test-Hyp4: Self-affirmation treatment will moderate (increase) the relationship between attitude and intention.
	
	reg intent i.treat_affirm##c.attitude
	// reject. p=0.959	
	tess 1.treat_affirm#c.attitude +
	
*Test-Hyp5: Self-affirmation treatment will moderate (decrease) the relationship between percieved control and intention.	
	
	reg intent i.treat_affirm##c.control
	// reject. p=0.149
	tess 1.treat_affirm#c.control -
	
*Test-Hyp6: High construal treatment will moderate (increase) the relationship between attitude and intention.

	reg intent i.treat_hiconstrual##c.attitude
	// reject. p=0.573
	tess 1.treat_hiconstrual#c.attitude +
	
*Test-Hyp7: High construal treatment will moderate (decrease) the relationship between percieved control and intention.	

	reg intent i.treat_hiconstrual##c.control
	// reject. p=0.918
	tess 1.treat_hiconstrual#c.control -
